import request from '@/utils/request'

// 查询
export function roleList(data) {
  return request({
    url: '/admin/permission/role',
    method: 'post',
    data: data
  })
}

// 新增
export function store(data) {
  return request({
    url: '/admin/permission/role/store',
    method: 'post',
    data: data
  })
}

// 更新
export function update(data, id) {
  return request({
    url: `/admin/permission/role/update/${id}`,
    method: 'put',
    data: data
  })
}

// 删除
export function destroy(id) {
  return request({
    url: `/admin/permission/role/destroy/${id}`,
    method: 'delete'
  })
}
